import React,{Component} from 'react'
import {HashRouter,Switch,Route,Redirect} from 'react-router-dom'
import Home from '@/page/home/home.jsx'
import Production from '@/page/production/production.jsx'
import NavLink from 'react-router-dom/NavLink';
import Balance from '@/page/balance/balance.jsx'
import Record from '@/page/record/record.jsx'
const routes = [
    {
        path:'/',
        exact:true,
        component:Home
    },
    {
        path:'/production',
        component:Production
    },
    
]
const getRoute = () =>(
    routes.map((route,i) => <Route key={i} {...route} />)
)
   

export default class RouterConfig extends Component{
    state = {
        formData :{
            orderSum:123
        }
    }
   
    render(){
        return(
            <HashRouter> 
                <Switch>
                    <Route path="/" exact component={Home} ></Route>
                    <Route path="/production"  component={Production} ></Route> 
                    <Route path="/balance"  component={Balance} ></Route> 
                    <Route path="/record"  component={Record} ></Route> 
                </Switch>
            </HashRouter>
        )
    }
}